import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const Tabbar = () => import('@/components/app-tabbar.vue')
const Home = () => import('@/views/home')
const Question = () => import('@/views/question')
const Video = () => import('@/views/video')
const User = () => import('@/views/user')
const Artcile = () => import('@/views/article')

const routes = [
  { path: '/', components: { default: Home, bottom: Tabbar } },
  { path: '/question', components: { default: Question, bottom: Tabbar } },
  { path: '/video', components: { default: Video, bottom: Tabbar } },
  { path: '/user', components: { default: User, bottom: Tabbar } },
  { path: '/article', component: Artcile }
]

const router = new VueRouter({
  routes
})

export default router
